package com.block.api.controller.page;

import cn.hutool.core.util.DesensitizedUtil;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.block.applet.service.AppletConfigInfoService;
import com.block.channel.service.IChannelBaseInfoService;
import com.block.common.service.IApplicationInfoService;
import com.block.common.service.ISystemConstantInfoService;
import com.block.common.service.merchant.IMerchantThirdBaseInfoService;
import com.block.common.util.LocalDateUtil;
import com.block.datapush.factory.PushApiFactory;
import com.block.datapush.model.result.ProtocolParamResult;
import com.block.db.entity.*;
import com.block.db.mapper.MemberSourceInfoMapper;
import com.block.db.mapper.MerchantBaseInfoMapper;
import com.block.db.mapper.SourcePushResultInfoMapper;
import com.block.match.service.IDataMatchOrderInfoService;
import com.block.match.service.IDataMatchOrderItemService;
import com.block.merchant.service.IMerchantBaseInfoService;
import com.market.member.service.IMemberSourceInfoService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;


@Controller
@RequestMapping("page")
public class PageController {

    @Autowired
    IDataMatchOrderInfoService dataMatchOrderInfoService;
    @Autowired
    IMemberSourceInfoService memberSourceInfoService;
    @Autowired
    IDataMatchOrderItemService dataMatchOrderItemService;
    @Autowired
    IMerchantBaseInfoService merchantBaseInfoService;
    @Resource
    MemberSourceInfoMapper memberSourceInfoMapper;
    @Autowired
    IMerchantThirdBaseInfoService merchantThirdBaseInfoService;

    @RequestMapping(value = "/source.html")
    public String source() {
        return "source";
    }


    /**
     * 用户协议
     */
    @RequestMapping(value = "/newprotocol/{orderId}/{orderItemIds}.html")
    public String newprotocol(@PathVariable("orderId") String orderId,
                              @PathVariable("orderItemIds") String orderItemIds,
                              ModelMap modelMap) {

        DataMatchOrderInfo matchOrderInfo = dataMatchOrderInfoService.getById(orderId);

        List<String> orderItemIdList = JSON.parseArray(JSON.toJSONString(orderItemIds.split("-")), String.class);

        List<Map<String, String>> mapList = new ArrayList<>();
        for (String itemId : orderItemIdList) {

            DataMatchOrderItem matchOrderItem = dataMatchOrderItemService.getById(itemId);
            MerchantBaseInfo merchantBaseInfo = merchantBaseInfoService.getById(matchOrderItem.getInfoId());

            Map<String, String> itemMap = new HashMap<>();
            itemMap.put("companyName", merchantBaseInfo.getCompanyName());
            itemMap.put("companyId", String.valueOf(merchantBaseInfo.getId()));

            if (StrUtil.equals(matchOrderItem.getInfoType(), "APIS")) {
                // 查询双授权 的 商户机构信息
                MerchantThirdBaseInfo thirdBaseInfo = merchantThirdBaseInfoService.selectEntityByOrderNo(matchOrderItem.getPushId());
                if (ObjectUtil.isNotEmpty(thirdBaseInfo)) {
                    String productInfo = StrUtil.format("{} | {}", thirdBaseInfo.getProductId(), thirdBaseInfo.getProductName());
                    itemMap.put("productInfo", productInfo);
                }
            }
            mapList.add(itemMap);
        }

        MemberSourceInfo memberSourceInfo = memberSourceInfoService.getById(matchOrderInfo.getUid());

        if (ObjectUtil.isNotEmpty(memberSourceInfo)) {
            modelMap.put("uid", String.valueOf(memberSourceInfo.getUid()));
            modelMap.put("realname", DesensitizedUtil.chineseName(memberSourceInfo.getRealname()));
            modelMap.put("idCard", DesensitizedUtil.idCardNum(memberSourceInfo.getIdcard(), 3, 3));
            if (StringUtils.isNotEmpty(memberSourceInfo.getMobile())) {
                modelMap.put("mobile", DesensitizedUtil.mobilePhone(memberSourceInfo.getMobile()));
            } else {
                modelMap.put("mobile", "");
            }
        }

//        modelMap.put("mobile", DesensitizedUtil.mobilePhone(memberSourceInfo.getMobile()));
        modelMap.put("approveTime", LocalDateUtil.getNowDateStr(LocalDateUtil.TOTAL_DATE_TIME));

//        modelMap.put("orderId", orderId);
        modelMap.put("itemMapList", mapList);

        return "approveCopy";
    }

    /**
     * 大麦花花  展示的协议
     */
    @RequestMapping(value = "/damaiprotocol/{uid}.html")
    public String damaiprotocol(@PathVariable("uid") String uid,
                                ModelMap modelMap) {

        MemberSourceInfo memberSourceInfo = memberSourceInfoService.getById(uid);

        JSONObject jsonObject = new JSONObject();
        jsonObject.put("accountNo", DesensitizedUtil.mobilePhone(memberSourceInfo.getMobile()));
        jsonObject.put("uid", String.valueOf(memberSourceInfo.getUid()));
        jsonObject.put("username", DesensitizedUtil.chineseName(memberSourceInfo.getRealname()));
        jsonObject.put("datetime", LocalDateUtil.getNowDateStr(LocalDateUtil.TOTAL_DATE_TIME));

        modelMap.put("userInfo", jsonObject);

        return "damai";
    }

    @RequestMapping(value = "/protocolYou/{uid}.html")
    public String protocolYou(@PathVariable("uid") String uid,
                              ModelMap modelMap) {

        MemberSourceInfo memberSourceInfo = memberSourceInfoService.getById(uid);

        modelMap.put("uid", String.valueOf(memberSourceInfo.getUid()));
        modelMap.put("username", memberSourceInfo.getRealname());
        modelMap.put("phone", memberSourceInfo.getMobile());
        modelMap.put("date", LocalDateUtil.getNowDateStr(LocalDateUtil.TOTAL_DATE_TIME));


        return "yiyouhua";
    }

    /**
     * （用户协议）
     */
    @RequestMapping(value = "/protocol/{uid}.html")
    public String userprotocol(@PathVariable("uid") String uid,
                               ModelMap modelMap) {

        MemberSourceInfo memberSourceInfo = memberSourceInfoService.getById(uid);

        modelMap.put("realname", DesensitizedUtil.chineseName(memberSourceInfo.getRealname()));
        modelMap.put("corporateName", "恒盛融资担保（福州）有限公司");
        modelMap.put("mobile", DesensitizedUtil.mobilePhone(memberSourceInfo.getMobile()));
        modelMap.put("creditCode", "91350121MA34LEK57M");
        modelMap.put("uid", uid);

        return "approveNew";
    }

    /**
     * （小财贷款撞库协议）
     */
    @RequestMapping(value = "/xiaocaiprotocol/{uid}.html")
    public String xiaocaiprotocol(@PathVariable("uid") String uid,
                                  ModelMap modelMap) {

        MemberSourceInfo memberSourceInfo = memberSourceInfoService.getById(uid);

        modelMap.put("realname", DesensitizedUtil.chineseName(memberSourceInfo.getRealname()));
        modelMap.put("idCard", DesensitizedUtil.idCardNum(memberSourceInfo.getIdcard(), 3, 3));
        modelMap.put("mobile", DesensitizedUtil.mobilePhone(memberSourceInfo.getMobile()));
        //modelMap.put("creditCode", "91350121MA34LEK57M");
        modelMap.put("approveTime", LocalDateUtil.getNowDateStr(LocalDateUtil.TOTAL_DATE_TIME));

        return "approveXiao";
    }

    /**
     * （用户协议）
     */
    @RequestMapping(value = "/protocolWei/{uid}.html")
    public String protocolWei(@PathVariable("uid") String uid,
                              ModelMap modelMap) {

        MemberSourceInfo memberSourceInfo = memberSourceInfoService.getById(uid);

        modelMap.put("realname", DesensitizedUtil.chineseName(memberSourceInfo.getRealname()));
        modelMap.put("idCard", DesensitizedUtil.idCardNum(memberSourceInfo.getIdcard(), 3, 3));
        modelMap.put("phone", DesensitizedUtil.mobilePhone(memberSourceInfo.getMobile()));
        modelMap.put("companyName", "恒盛融资担保（福州）有限公司");
        modelMap.put("productName", "安易融");
        modelMap.put("orgCompanyName", "杭州闳翎科技有限公司");
        modelMap.put("orgProductName", "云微融");
        modelMap.put("date", LocalDateUtil.getNowDateStr(LocalDateUtil.TOTAL_DATE_TIME));

        return "approveWei";
    }

    /**
     * 微好用
     * @param uid 用户id
     * @param modelMap 信息参数
     * @return 返回
     */
    @RequestMapping(value = "/protocolHaoYong/{uid}.html")
    public String protocolHaoYong(@PathVariable("uid") String uid,
                                  ModelMap modelMap) {

        MemberSourceInfo memberSourceInfo = memberSourceInfoService.getById(uid);

        modelMap.put("realname", DesensitizedUtil.chineseName(memberSourceInfo.getRealname()));
        modelMap.put("idCard", DesensitizedUtil.idCardNum(memberSourceInfo.getIdcard(), 3, 3));
        modelMap.put("phone", DesensitizedUtil.mobilePhone(memberSourceInfo.getMobile()));
        modelMap.put("companyName", "恒盛融资担保（福州）有限公司");
        modelMap.put("productName", "安易融");
        modelMap.put("orgCompanyName", "杭州英英子科技有限公司");
        modelMap.put("orgProductName", "钱来顺");
        modelMap.put("date", LocalDateUtil.getNowDateStr(LocalDateUtil.TOTAL_DATE_TIME));

        return "approveWeiHao";
    }

    @RequestMapping(value = "/protocolWeiHaoYong/{uid}.html")
    public String protocolWeiHaoYong(@PathVariable("uid") String uid,
                                     ModelMap modelMap) {

        MemberSourceInfo memberSourceInfo = memberSourceInfoService.getById(uid);

        modelMap.put("realname", DesensitizedUtil.chineseName(memberSourceInfo.getRealname()));
        modelMap.put("idCard", DesensitizedUtil.idCardNum(memberSourceInfo.getIdcard(), 3, 3));
        modelMap.put("phone", DesensitizedUtil.mobilePhone(memberSourceInfo.getMobile()));
        modelMap.put("uid", uid);
        modelMap.put("date", LocalDateUtil.getNowDateStr(LocalDateUtil.TOTAL_DATE_TIME));

        return "approveWeiHaoYong";
    }

    @RequestMapping(value = "/protocoNewlWei/{uid}.html")
    public String protocoNewlWei(@PathVariable("uid") String uid,
                                 ModelMap modelMap) {

        MemberSourceInfo memberSourceInfo = memberSourceInfoService.getById(uid);

        modelMap.put("realname", DesensitizedUtil.chineseName(memberSourceInfo.getRealname()));
        modelMap.put("idCard", DesensitizedUtil.idCardNum(memberSourceInfo.getIdcard(), 3, 3));
        modelMap.put("phone", DesensitizedUtil.mobilePhone(memberSourceInfo.getMobile()));
        modelMap.put("uid", uid);
        modelMap.put("date", LocalDateUtil.getNowDateStr(LocalDateUtil.TOTAL_DATE_TIME));

        return "approveNewWei";
    }

    @RequestMapping(value = "/jinYaoHua/{uid}.html")
    public String protocoljinYaoHua(@PathVariable("uid") String uid,
                                    ModelMap modelMap) {
        return "jinYaoHua";
    }

    @RequestMapping(value = "/jinYaoHua1/{uid}.html")
    public String protocoljinYaoHua1(@PathVariable("uid") String uid,
                                     ModelMap modelMap) {
        return "jinYaoHua1";
    }


    /**
     * 用户协议（金耀花）/
     */
    @RequestMapping(value = "/newprotocol/{infoId}/{orderId}/{orderItemIds}.html")
    public String newprotocolJinYaoHua(@PathVariable("infoId") String infoId,
                                       @PathVariable("orderId") String orderId,
                                       @PathVariable("orderItemIds") String orderItemIds,
                                       ModelMap modelMap) {

        DataMatchOrderInfo matchOrderInfo = dataMatchOrderInfoService.getById(orderId);
        MerchantBaseInfo merchantBaseInfo1 = merchantBaseInfoMapper.selectById(infoId);

        List<String> orderItemIdList = JSON.parseArray(JSON.toJSONString(orderItemIds.split("-")), String.class);

        List<Map<String, String>> mapList = new ArrayList<>();
        for (String itemId : orderItemIdList) {

            DataMatchOrderItem matchOrderItem = dataMatchOrderItemService.getById(itemId);
            MerchantBaseInfo merchantBaseInfo = merchantBaseInfoService.getById(matchOrderItem.getInfoId());

            Map<String, String> itemMap = new HashMap<>();
            itemMap.put("companyName", merchantBaseInfo.getCompanyName());
            itemMap.put("companyId", String.valueOf(merchantBaseInfo.getId()));

            if (StrUtil.equals(matchOrderItem.getInfoType(), "APIS")) {
                // 查询双授权 的 商户机构信息
                MerchantThirdBaseInfo thirdBaseInfo = merchantThirdBaseInfoService.selectEntityByOrderNo(matchOrderItem.getPushId());
                if (ObjectUtil.isNotEmpty(thirdBaseInfo)) {
                    String productInfo = StrUtil.format("{} | {}", thirdBaseInfo.getProductId(), thirdBaseInfo.getProductName());
                    itemMap.put("productInfo", productInfo);
                }
            }
            mapList.add(itemMap);
        }

        MemberSourceInfo memberSourceInfo = memberSourceInfoService.getById(matchOrderInfo.getUid());

        if (ObjectUtil.isNotEmpty(memberSourceInfo)) {
            modelMap.put("uid", String.valueOf(memberSourceInfo.getUid()));
            modelMap.put("username", DesensitizedUtil.chineseName(memberSourceInfo.getRealname()));
            modelMap.put("idcard", DesensitizedUtil.idCardNum(memberSourceInfo.getIdcard(), 3, 3));
            if (StringUtils.isNotEmpty(memberSourceInfo.getMobile())) {
                modelMap.put("mobile", memberSourceInfo.getMobile());
            } else {
                modelMap.put("mobile", "");
            }
        }

//        modelMap.put("mobile", DesensitizedUtil.mobilePhone(memberSourceInfo.getMobile()));
        modelMap.put("datetime", LocalDateUtil.getNowDateStr(LocalDateUtil.TOTAL_DATE_TIME));

//        modelMap.put("orderId", orderId);
        modelMap.put("itemMapList", mapList);
        if (StrUtil.equals("370", infoId)) {
            modelMap.put("companyTitle", merchantBaseInfo1.getCompanyTitle());
        }

        return "approveCopy";
    }

    /**
     * 用户协议
     */
    @RequestMapping(value = "/protocol/{orderId}/{orderItemIds}.html")
    public String userProtocol(@PathVariable("orderId") String orderId,
                               @PathVariable("orderItemIds") String orderItemIds,
                               ModelMap modelMap) {

        // TODO: 2023/8/23 访问条件判断

        DataMatchOrderInfo matchOrderInfo = dataMatchOrderInfoService.getById(orderId);

        List<String> orderItemIdList = JSON.parseArray(JSON.toJSONString(orderItemIds.split("-")), String.class);

        List<Map<String, String>> mapList = new ArrayList<>();
        for (String itemId : orderItemIdList) {

            DataMatchOrderItem matchOrderItem = dataMatchOrderItemService.getById(itemId);
            MerchantBaseInfo merchantBaseInfo = merchantBaseInfoService.getById(matchOrderItem.getInfoId());

            Map<String, String> itemMap = new HashMap<>();
            itemMap.put("companyName", merchantBaseInfo.getCompanyName());
            itemMap.put("companyId", String.valueOf(merchantBaseInfo.getId()));

            mapList.add(itemMap);
        }

        MemberSourceInfo memberSourceInfo = memberSourceInfoService.getById(matchOrderInfo.getUid());

        modelMap.put("realname", DesensitizedUtil.chineseName(memberSourceInfo.getRealname()));
        modelMap.put("idCard", DesensitizedUtil.idCardNum(memberSourceInfo.getIdcard(), 3, 3));
        modelMap.put("mobile", DesensitizedUtil.mobilePhone(memberSourceInfo.getMobile()));
        modelMap.put("approveTime", LocalDateUtil.getNowDateStr(LocalDateUtil.TOTAL_DATE_TIME));
        modelMap.put("uid", String.valueOf(memberSourceInfo.getUid()));

        modelMap.put("orderId", orderId);
        modelMap.put("itemMapList", mapList);

        return "approveCopy";
    }

    @RequestMapping(value = "/protocolHong/{orderId}/{orderItemIds}.html")
    public String userProtocol2(@PathVariable("orderId") String orderId,
                                @PathVariable("orderItemIds") String orderItemIds,
                                ModelMap modelMap) {

        DataMatchOrderInfo matchOrderInfo = dataMatchOrderInfoService.getById(orderId);

        List<String> orderItemIdList = JSON.parseArray(JSON.toJSONString(orderItemIds.split("-")), String.class);

        List<Map<String, String>> mapList = new ArrayList<>();
        for (String itemId : orderItemIdList) {

            DataMatchOrderItem matchOrderItem = dataMatchOrderItemService.getById(itemId);
            MerchantBaseInfo merchantBaseInfo = merchantBaseInfoService.getById(matchOrderItem.getInfoId());

            Map<String, String> itemMap = new HashMap<>();
            itemMap.put("companyName", merchantBaseInfo.getCompanyName());
            itemMap.put("companyId", String.valueOf(merchantBaseInfo.getId()));

            mapList.add(itemMap);
        }

        MemberSourceInfo memberSourceInfo = memberSourceInfoService.getById(matchOrderInfo.getUid());

        modelMap.put("realname", DesensitizedUtil.chineseName(memberSourceInfo.getRealname()));
        modelMap.put("idCard", DesensitizedUtil.idCardNum(memberSourceInfo.getIdcard(), 3, 3));
        modelMap.put("mobile", DesensitizedUtil.mobilePhone(memberSourceInfo.getMobile()));
        modelMap.put("approveTime", LocalDateUtil.getNowDateStr(LocalDateUtil.TOTAL_DATE_TIME));

        modelMap.put("uid", memberSourceInfo.getUid());
        modelMap.put("itemMapList", mapList);

        return "approveHong";
    }

    @RequestMapping(value = "/protocolRong/{orderId}/{orderItemIds}.html")
    public String userProtocol3(@PathVariable("orderId") String orderId,
                                @PathVariable("orderItemIds") String orderItemIds,
                                ModelMap modelMap) {

        DataMatchOrderInfo matchOrderInfo = dataMatchOrderInfoService.getById(orderId);

        List<String> orderItemIdList = JSON.parseArray(JSON.toJSONString(orderItemIds.split("-")), String.class);

        List<Map<String, String>> mapList = new ArrayList<>();
        for (String itemId : orderItemIdList) {

            DataMatchOrderItem matchOrderItem = dataMatchOrderItemService.getById(itemId);
            MerchantBaseInfo merchantBaseInfo = merchantBaseInfoService.getById(matchOrderItem.getInfoId());

            Map<String, String> itemMap = new HashMap<>();
            itemMap.put("companyName", merchantBaseInfo.getCompanyName());
            itemMap.put("companyId", String.valueOf(merchantBaseInfo.getId()));

            mapList.add(itemMap);
        }

        MemberSourceInfo memberSourceInfo = memberSourceInfoService.getById(matchOrderInfo.getUid());

        modelMap.put("realname", DesensitizedUtil.chineseName(memberSourceInfo.getRealname()));
        modelMap.put("idCard", DesensitizedUtil.idCardNum(memberSourceInfo.getIdcard(), 3, 3));
        modelMap.put("mobile", DesensitizedUtil.mobilePhone(memberSourceInfo.getMobile()));
        modelMap.put("approveTime", LocalDateUtil.getNowDateStr(LocalDateUtil.TOTAL_DATE_TIME));

        modelMap.put("uid", memberSourceInfo.getUid());
        modelMap.put("itemMapList", mapList);

        return "approveRong";
    }

    @RequestMapping(value = "/protocolXin/{orderId}/{orderItemIds}.html")
    public String userProtocol4(@PathVariable("orderId") String orderId,
                                @PathVariable("orderItemIds") String orderItemIds,
                                ModelMap modelMap) {

        DataMatchOrderInfo matchOrderInfo = dataMatchOrderInfoService.getById(orderId);

        List<String> orderItemIdList = JSON.parseArray(JSON.toJSONString(orderItemIds.split("-")), String.class);

        List<Map<String, String>> mapList = new ArrayList<>();
        for (String itemId : orderItemIdList) {

            DataMatchOrderItem matchOrderItem = dataMatchOrderItemService.getById(itemId);
            MerchantBaseInfo merchantBaseInfo = merchantBaseInfoService.getById(matchOrderItem.getInfoId());

            Map<String, String> itemMap = new HashMap<>();
            itemMap.put("companyName", merchantBaseInfo.getCompanyName());
            itemMap.put("companyId", String.valueOf(merchantBaseInfo.getId()));

            mapList.add(itemMap);
        }

        MemberSourceInfo memberSourceInfo = memberSourceInfoService.getById(matchOrderInfo.getUid());

        modelMap.put("realname", DesensitizedUtil.chineseName(memberSourceInfo.getRealname()));
        modelMap.put("idCard", DesensitizedUtil.idCardNum(memberSourceInfo.getIdcard(), 3, 3));
        modelMap.put("mobile", DesensitizedUtil.mobilePhone(memberSourceInfo.getMobile()));
        modelMap.put("approveTime", LocalDateUtil.getNowDateStr(LocalDateUtil.TOTAL_DATE_TIME));

        modelMap.put("uid", String.valueOf(memberSourceInfo.getUid()));
        modelMap.put("itemMapList", mapList);

        return "approveXin";
    }

    @RequestMapping(value = "/protocolYi/{orderId}/{orderItemIds}.html")
    public String userProtocol5(@PathVariable("orderId") String orderId,
                                @PathVariable("orderItemIds") String orderItemIds,
                                ModelMap modelMap) {

        DataMatchOrderInfo matchOrderInfo = dataMatchOrderInfoService.getById(orderId);

        List<String> orderItemIdList = JSON.parseArray(JSON.toJSONString(orderItemIds.split("-")), String.class);

        List<Map<String, String>> mapList = new ArrayList<>();
        for (String itemId : orderItemIdList) {

            DataMatchOrderItem matchOrderItem = dataMatchOrderItemService.getById(itemId);
            MerchantBaseInfo merchantBaseInfo = merchantBaseInfoService.getById(matchOrderItem.getInfoId());

            Map<String, String> itemMap = new HashMap<>();
            itemMap.put("companyName", merchantBaseInfo.getCompanyName());
            itemMap.put("companyId", String.valueOf(merchantBaseInfo.getId()));

            mapList.add(itemMap);
        }

        MemberSourceInfo memberSourceInfo = memberSourceInfoService.getById(matchOrderInfo.getUid());

        modelMap.put("realname", DesensitizedUtil.chineseName(memberSourceInfo.getRealname()));
        modelMap.put("idCard", DesensitizedUtil.idCardNum(memberSourceInfo.getIdcard(), 3, 3));
        modelMap.put("mobile", DesensitizedUtil.mobilePhone(memberSourceInfo.getMobile()));
        modelMap.put("approveTime", LocalDateUtil.getNowDateStr(LocalDateUtil.TOTAL_DATE_TIME));

        modelMap.put("uid", String.valueOf(memberSourceInfo.getUid()));
        modelMap.put("itemMapList", mapList);

        return "approveYi";
    }

    @RequestMapping(value = "/protocolLes/{orderId}/{orderItemIds}.html")
    public String userProtocol6(@PathVariable("orderId") String orderId,
                                @PathVariable("orderItemIds") String orderItemIds,
                                ModelMap modelMap) {

        DataMatchOrderInfo matchOrderInfo = dataMatchOrderInfoService.getById(orderId);

        List<String> orderItemIdList = JSON.parseArray(JSON.toJSONString(orderItemIds.split("-")), String.class);

        List<Map<String, String>> mapList = new ArrayList<>();
        for (String itemId : orderItemIdList) {

            DataMatchOrderItem matchOrderItem = dataMatchOrderItemService.getById(itemId);
            MerchantBaseInfo merchantBaseInfo = merchantBaseInfoService.getById(matchOrderItem.getInfoId());

            Map<String, String> itemMap = new HashMap<>();
            itemMap.put("companyName", merchantBaseInfo.getCompanyName());
            itemMap.put("companyId", String.valueOf(merchantBaseInfo.getId()));

            mapList.add(itemMap);
        }

        MemberSourceInfo memberSourceInfo = memberSourceInfoService.getById(matchOrderInfo.getUid());

        modelMap.put("realname", DesensitizedUtil.chineseName(memberSourceInfo.getRealname()));
        modelMap.put("idCard", DesensitizedUtil.idCardNum(memberSourceInfo.getIdcard(), 3, 3));
        modelMap.put("mobile", DesensitizedUtil.mobilePhone(memberSourceInfo.getMobile()));
        modelMap.put("approveTime", LocalDateUtil.getNowDateStr(LocalDateUtil.TOTAL_DATE_TIME));

        modelMap.put("uid", String.valueOf(memberSourceInfo.getUid()));
        modelMap.put("itemMapList", mapList);

        return "approveLe";
    }

    @RequestMapping(value = "/protocolBei/{orderId}/{orderItemIds}.html")
    public String userProtocol7(@PathVariable("orderId") String orderId,
                                @PathVariable("orderItemIds") String orderItemIds,
                                ModelMap modelMap) {

        DataMatchOrderInfo matchOrderInfo = dataMatchOrderInfoService.getById(orderId);
        MemberSourceInfo memberSourceInfo = memberSourceInfoService.getById(matchOrderInfo.getUid());
        modelMap.put("realname", DesensitizedUtil.chineseName(memberSourceInfo.getRealname()));
        modelMap.put("idCard", DesensitizedUtil.idCardNum(memberSourceInfo.getIdcard(), 3, 3));
        modelMap.put("mobile", DesensitizedUtil.mobilePhone(memberSourceInfo.getMobile()));
        modelMap.put("approveTime", LocalDateUtil.getNowDateStr(LocalDateUtil.TOTAL_DATE_TIME));

        modelMap.put("uid", String.valueOf(memberSourceInfo.getUid()));

        return "approveBei";
    }

    @RequestMapping(value = "/protocolHui/{orderId}/{orderItemIds}.html")
    public String userProtocol8(@PathVariable("orderId") String orderId,
                                @PathVariable("orderItemIds") String orderItemIds,
                                ModelMap modelMap) {

        DataMatchOrderInfo matchOrderInfo = dataMatchOrderInfoService.getById(orderId);
        MemberSourceInfo memberSourceInfo = memberSourceInfoService.getById(matchOrderInfo.getUid());
        modelMap.put("realname", DesensitizedUtil.chineseName(memberSourceInfo.getRealname()));
        modelMap.put("idCard", DesensitizedUtil.idCardNum(memberSourceInfo.getIdcard(), 3, 3));
        modelMap.put("mobile", DesensitizedUtil.mobilePhone(memberSourceInfo.getMobile()));
        modelMap.put("approveTime", LocalDateUtil.getNowDateStr(LocalDateUtil.TOTAL_DATE_TIME));

        modelMap.put("uid", String.valueOf(memberSourceInfo.getUid()));

        return "approveHui";
    }

    @RequestMapping(value = "/protocolJu/{orderId}/{orderItemIds}.html")
    public String userProtocol9(@PathVariable("orderId") String orderId,
                                @PathVariable("orderItemIds") String orderItemIds,
                                ModelMap modelMap) {

        DataMatchOrderInfo matchOrderInfo = dataMatchOrderInfoService.getById(orderId);
        MemberSourceInfo memberSourceInfo = memberSourceInfoService.getById(matchOrderInfo.getUid());
        modelMap.put("realname", DesensitizedUtil.chineseName(memberSourceInfo.getRealname()));
        modelMap.put("idCard", DesensitizedUtil.idCardNum(memberSourceInfo.getIdcard(), 3, 3));
        modelMap.put("mobile", DesensitizedUtil.mobilePhone(memberSourceInfo.getMobile()));
        modelMap.put("approveTime", LocalDateUtil.getNowDateStr(LocalDateUtil.TOTAL_DATE_TIME));

        modelMap.put("uid", String.valueOf(memberSourceInfo.getUid()));

        return "approveJi";
    }

    @RequestMapping(value = "/protocolBao/{orderId}/{orderItemIds}.html")
    public String userProtocol10(@PathVariable("orderId") String orderId,
                                 @PathVariable("orderItemIds") String orderItemIds,
                                 ModelMap modelMap) {

        DataMatchOrderInfo matchOrderInfo = dataMatchOrderInfoService.getById(orderId);
        MemberSourceInfo memberSourceInfo = memberSourceInfoService.getById(matchOrderInfo.getUid());
        modelMap.put("realname", DesensitizedUtil.chineseName(memberSourceInfo.getRealname()));
        modelMap.put("idCard", DesensitizedUtil.idCardNum(memberSourceInfo.getIdcard(), 3, 3));
        modelMap.put("mobile", DesensitizedUtil.mobilePhone(memberSourceInfo.getMobile()));
        modelMap.put("approveTime", LocalDateUtil.getNowDateStr(LocalDateUtil.TOTAL_DATE_TIME));

        modelMap.put("uid", String.valueOf(memberSourceInfo.getUid()));

        return "approveBao";
    }

    @RequestMapping(value = "/protocolHe/{orderId}/{orderItemIds}.html")
    public String userProtocol11(@PathVariable("orderId") String orderId,
                                 @PathVariable("orderItemIds") String orderItemIds,
                                 ModelMap modelMap) {

        DataMatchOrderInfo matchOrderInfo = dataMatchOrderInfoService.getById(orderId);
        MemberSourceInfo memberSourceInfo = memberSourceInfoService.getById(matchOrderInfo.getUid());
        modelMap.put("realname", DesensitizedUtil.chineseName(memberSourceInfo.getRealname()));
        modelMap.put("idCard", DesensitizedUtil.idCardNum(memberSourceInfo.getIdcard(), 3, 3));
        modelMap.put("mobile", DesensitizedUtil.mobilePhone(memberSourceInfo.getMobile()));
        modelMap.put("approveTime", LocalDateUtil.getNowDateStr(LocalDateUtil.TOTAL_DATE_TIME));

        modelMap.put("uid", String.valueOf(memberSourceInfo.getUid()));

        return "approveHe";
    }


    /**
     * 淘金的协议
     */
    @RequestMapping(value = "/pubprotocol/{infoId}/{uid}.html")
    public String pubprotocol(@PathVariable("infoId") String infoId,
                              @PathVariable("uid") String uid,
                              ModelMap modelMap) {

        MerchantBaseInfo merchantBaseInfo = merchantBaseInfoService.getById(infoId);

        modelMap.put("companyName", merchantBaseInfo.getCompanyName());
        modelMap.put("companyId", String.valueOf(merchantBaseInfo.getId()));

        MemberSourceInfo memberSourceInfo = memberSourceInfoService.getById(uid);
        modelMap.put("realname", DesensitizedUtil.chineseName(memberSourceInfo.getRealname()));
        modelMap.put("idCard", DesensitizedUtil.idCardNum(memberSourceInfo.getIdcard(), 3, 3));
        modelMap.put("mobile", DesensitizedUtil.mobilePhone(memberSourceInfo.getMobile()));
        modelMap.put("approveTime", LocalDateUtil.getNowDateStr(LocalDateUtil.TOTAL_DATE_TIME));

        return "pubprotocol";
    }

    /**
     *
     *
     * 商户自己的协议
     */
    @RequestMapping(value = "/priprotocol/{infoId}/{uid}.html")
    public String priprotocol(@PathVariable("infoId") String infoId,
                              @PathVariable("uid") String uid,
                              ModelMap modelMap) {
        try {
            MerchantBaseInfo merchantBaseInfo = merchantBaseInfoService.getById(infoId);

            MemberSourceInfo memberSourceInfo = memberSourceInfoService.getById(uid);

            ProtocolParamResult paramResult = PushApiFactory.getService(merchantBaseInfo.getFactoryType())
                    .getProtocolResult(merchantBaseInfo, memberSourceInfo);

            modelMap.addAttribute("userInfo", paramResult.getUserInfo());
            modelMap.addAttribute("extInfo", paramResult.getExtInfo());

            return paramResult.getFilePath();
        } catch (Exception exception) {
            exception.printStackTrace();
        }
        return "pubprotocol";
    }

    /**
     * http://127.0.0.1:1779/page/protocol/qidai/82/8cd4cc38dda426accd181c08471603f6.html
     * http://apitest.koukoudai.shop/page/protocol/qidai/82/8cd4cc38dda426accd181c08471603f6.html
     * /protocol/qidai//.html
     * 商户自己的协议
     */
    @RequestMapping(value = "/protocol/qidai/{infoId}/{mobileMd5}.html")
    public String qidaiprotocol(@PathVariable("infoId") String infoId,
                                @PathVariable("mobileMd5") String mobileMd5,
                                ModelMap modelMap) {
        try {
            MerchantBaseInfo merchantBaseInfo = merchantBaseInfoService.getById(infoId);

            MemberSourceInfo memberSourceInfo = memberSourceInfoMapper.selectByMobileMd5(mobileMd5);
            ProtocolParamResult paramResult = PushApiFactory.getService(merchantBaseInfo.getFactoryType())
                    .getProtocolResult(merchantBaseInfo, memberSourceInfo);

            modelMap.addAttribute("userInfo", paramResult.getUserInfo());
            modelMap.addAttribute("extInfo", paramResult.getExtInfo());

            return paramResult.getFilePath();
        } catch (Exception exception) {
            exception.printStackTrace();
        }
        return "pubprotocol";
    }

    @Resource
    MerchantBaseInfoMapper merchantBaseInfoMapper;

    @RequestMapping(value = "/WeiJieHua2/{uid}.html")
    public String protocolWeiJieHua2(@PathVariable("uid") String uid,
                                     ModelMap modelMap) {
        MemberSourceInfo memberSourceInfo = memberSourceInfoService.getById(uid);

        modelMap.put("realname", DesensitizedUtil.chineseName(memberSourceInfo.getRealname()));
        modelMap.put("phone", DesensitizedUtil.mobilePhone(memberSourceInfo.getMobile()));
        modelMap.put("companyName", "恒盛融资担保（福州）有限公司");
        modelMap.put("productName", "微借花");
        modelMap.put("orgCompanyName", "北京添香科技有限公司");
        modelMap.put("date", LocalDateUtil.getNowDateStr(LocalDateUtil.TOTAL_DATE_TIME));
        return "WeiJieHua2";
    }

    @RequestMapping(value = "/RongYouKe/{uid}.html")
    public String protocolRongYouKe(@PathVariable("uid") String uid,
                                    ModelMap modelMap) {
        modelMap.put("myCompanyName", "成都辰阳科弘科技有限公司");
        modelMap.put("appName", "融优客");
        modelMap.put("myCompanyAddress", "中国(四川)自由贸易试验区成都高新区益州大道中段599号13栋24楼2405号");
        return "rongYouKe";
    }

    @RequestMapping(value = "/RongYouKe1/{uid}.html")
    public String protocolRongYouKe1(@PathVariable("uid") String uid,
                                     ModelMap modelMap) {
        modelMap.put("myCompanyName", "成都辰阳科弘科技有限公司");
        modelMap.put("appName", "融优客");
        modelMap.put("myCompanyAddress", "中国(四川)自由贸易试验区成都高新区益州大道中段599号13栋24楼2405号");
        return "rongYouKe1";
    }

    @RequestMapping(value = "/newprotocolApib/{orderId}/{orderItemIds}.html")
    public String newprotocolApib(@PathVariable("orderId") String orderId,
                                  @PathVariable("orderItemIds") String orderItemIds,
                                  ModelMap modelMap) {

        DataMatchOrderInfo matchOrderInfo = dataMatchOrderInfoService.getById(orderId);

        List<String> orderItemIdList = JSON.parseArray(JSON.toJSONString(orderItemIds.split("-")), String.class);

        List<Map<String, String>> mapList = new ArrayList<>();
        for (String itemId : orderItemIdList) {

            DataMatchOrderItem matchOrderItem = dataMatchOrderItemService.getById(itemId);
            MerchantBaseInfo merchantBaseInfo = merchantBaseInfoService.getById(matchOrderItem.getInfoId());

            Map<String, String> itemMap = new HashMap<>();
            itemMap.put("companyName", merchantBaseInfo.getCompanyName());
            itemMap.put("companyId", String.valueOf(merchantBaseInfo.getId()));

            if (StrUtil.equals(matchOrderItem.getInfoType(), "APIB")) {
                // 查询半流程 的 商户机构信息
//                MerchantThirdBaseInfo thirdBaseInfo = merchantThirdBaseInfoService.selectEntityByOrderNo(matchOrderItem.getPushId());
//                if (ObjectUtil.isNotEmpty(thirdBaseInfo)){
                String productInfo = StrUtil.format("{} | {}", matchOrderItem.getPushId(), merchantBaseInfo.getCompanyName());
                itemMap.put("productInfo", productInfo);
            }
//            }
            mapList.add(itemMap);
        }

        MemberSourceInfo memberSourceInfo = memberSourceInfoService.getById(matchOrderInfo.getUid());

        if (ObjectUtil.isNotEmpty(memberSourceInfo)) {
            modelMap.put("uid", String.valueOf(memberSourceInfo.getUid()));
            modelMap.put("realname", DesensitizedUtil.chineseName(memberSourceInfo.getRealname()));
            modelMap.put("idCard", DesensitizedUtil.idCardNum(memberSourceInfo.getIdcard(), 3, 3));
            if (StringUtils.isNotEmpty(memberSourceInfo.getMobile())) {
                modelMap.put("mobile", DesensitizedUtil.mobilePhone(memberSourceInfo.getMobile()));
            } else {
                modelMap.put("mobile", "");
            }
        }

//        modelMap.put("mobile", DesensitizedUtil.mobilePhone(memberSourceInfo.getMobile()));
        modelMap.put("approveTime", LocalDateUtil.getNowDateStr(LocalDateUtil.TOTAL_DATE_TIME));

//        modelMap.put("orderId", orderId);
        modelMap.put("itemMapList", mapList);

        return "approveCopy";
    }

    @RequestMapping(value = "/haohan/{uid}.html")
    public String protocolHaoHan(@PathVariable("uid") String uid,
                                 ModelMap modelMap) {
        MemberSourceInfo memberSourceInfo = memberSourceInfoService.getById(uid);
        modelMap.put("realname", DesensitizedUtil.chineseName(memberSourceInfo.getRealname()));
        modelMap.put("idCard", DesensitizedUtil.idCardNum(memberSourceInfo.getIdcard(), 3, 3));

        modelMap.put("date", LocalDateUtil.getNowDateStr(LocalDateUtil.TOTAL_DATE_TIME));
        return "haohan";
    }

    @RequestMapping(value = "/JiKe/{uid}.html")
    public String protocolJiKe(@PathVariable("uid") String uid,
                               ModelMap modelMap) {
        MemberSourceInfo memberSourceInfo = memberSourceInfoService.getById(uid);
        modelMap.put("phone", DesensitizedUtil.mobilePhone(memberSourceInfo.getMobile()));
        modelMap.put("uid", uid);

        modelMap.put("date", LocalDateUtil.getNowDateStr(LocalDateUtil.TOTAL_DATE_TIME));
        return "approveJike";
    }

    @RequestMapping(value = "/protocolLe/{uid}.html")
    public String protocolLe(@PathVariable("uid") String uid,
                             ModelMap modelMap) {
        MemberSourceInfo memberSourceInfo = memberSourceInfoService.getById(uid);
        modelMap.put("username", memberSourceInfo.getRealname());
        modelMap.put("uid", uid);
        modelMap.put("date", LocalDateUtil.getNowDateStr(LocalDateUtil.TOTAL_DATE_TIME));
        return "leshantong";
    }

    @Autowired
    IApplicationInfoService applicationInfoService;
    @Autowired
    IChannelBaseInfoService channelBaseInfoService;
    @Autowired
    ISystemConstantInfoService systemConstantInfoService;
    @RequestMapping(value = "/privacyPolicy/{channelCode}.html")
    public String privacyPolicy(@PathVariable("channelCode") String channelCode,
                             ModelMap modelMap) {
        ChannelBaseInfo channelBaseInfo = channelBaseInfoService.getSelectByChannelCode(channelCode);
        ApplicationInfo appInfoByAppCode = applicationInfoService.getAppInfoByAppCode(channelBaseInfo.getAppCode());
        SystemConstantInfo info = systemConstantInfoService.getById(6);
        if(StrUtil.equals(channelCode, "bldd_mini")) {
//            modelMap.put("appName", appInfoByAppCode.getAppName());
//            modelMap.put("companyName", appInfoByAppCode.getCompanyName());
//            modelMap.put("companyAddress", appInfoByAppCode.getCompanyAddress());
//            modelMap.put("phone", info.getContentInfo());
            return "privacyPolicyDd";
        }
          if(StrUtil.equals(channelCode,"hengxiaorong_mini") || StrUtil.equals(channelCode,"beitun_mini")
                  || StrUtil.equals(channelCode,"xinhui_mini") || StrUtil.equals(channelCode,"anyxhh5")){
              modelMap.put("appName", appInfoByAppCode.getNameVersion());
              modelMap.put("companyName", appInfoByAppCode.getCompanyName());
              modelMap.put("companyAddress", appInfoByAppCode.getCompanyAddress());
              modelMap.put("phone", info.getContentInfo());
              return "privacyPolicyXd";
          }
        if(StrUtil.equals(channelCode,"hanglian_mini")){
//            modelMap.put("appName", appInfoByAppCode.getAppName());
//            modelMap.put("companyName", appInfoByAppCode.getCompanyName());
//            modelMap.put("companyAddress", appInfoByAppCode.getCompanyAddress());
//            modelMap.put("phone", info.getContentInfo());
            return "privacyPolicyLs";
        }
        modelMap.put("appName", appInfoByAppCode.getNameVersion());
        modelMap.put("companyName", appInfoByAppCode.getCompanyName());
        modelMap.put("companyAddress", appInfoByAppCode.getCompanyAddress());
        modelMap.put("phone", info.getContentInfo());
        return "privacyPolicyZd";
    }

    @RequestMapping(value = "/agreement/{channelCode}.html")
    public String agreement(@PathVariable("channelCode") String channelCode,
                                ModelMap modelMap) {
        ChannelBaseInfo channelBaseInfo = channelBaseInfoService.getSelectByChannelCode(channelCode);
        ApplicationInfo appInfoByAppCode = applicationInfoService.getAppInfoByAppCode(channelBaseInfo.getAppCode());

        if(StrUtil.equals(channelCode, "bldd_mini")) {
//            modelMap.put("appName", appInfoByAppCode.getNameVersion());
//            modelMap.put("companyName", appInfoByAppCode.getCompanyName());
            return "agreementDd";
        }
        if(StrUtil.equals(channelCode,"hengxiaorong_mini") || StrUtil.equals(channelCode,"beitun_mini")
                || StrUtil.equals(channelCode,"xinhui_mini") || StrUtil.equals(channelCode,"anyxhh5")){
            modelMap.put("appName", appInfoByAppCode.getNameVersion());
            modelMap.put("companyName", appInfoByAppCode.getCompanyName());
            return "agreementXd";
        }
        if(StrUtil.equals(channelCode,"hanglian_mini")){
//            modelMap.put("appName", appInfoByAppCode.getNameVersion());
//            modelMap.put("companyName", appInfoByAppCode.getCompanyName());
            return "agreementLs";
        }
        modelMap.put("appName", appInfoByAppCode.getNameVersion());
        modelMap.put("companyName", appInfoByAppCode.getCompanyName());
        modelMap.put("companyAddress", appInfoByAppCode.getCompanyAddress());
        return "agreementZd";
    }


    @RequestMapping(value = "/yunfuwu.html")
    public String protocolyunfuwu(ModelMap modelMap) {
        return "yunfuwu";
    }

    @RequestMapping(value = "/yunyinsi.html")
    public String protocolyunyinsi(ModelMap modelMap) {
        return "yunyinsi";
    }

    @RequestMapping(value = "/longfuwu.html")
    public String protocollongfuwu(ModelMap modelMap) {
        return "longfuwul";
    }

    @RequestMapping(value = "/longyinsi.html")
    public String protocollongyinsi(ModelMap modelMap) {
        return "longyinsil";
    }

    @RequestMapping(value = "/dafuwu.html")
    public String protocoldafuwu(ModelMap modelMap) {
        return "dafuwu";
    }

    @RequestMapping(value = "/dayinsi.html")
    public String protocoldayinsi(ModelMap modelMap) {
        return "dayinsi";
    }

    @RequestMapping(value = "/jiafuwu.html")
    public String protocoljiafuwu(ModelMap modelMap) {
        return "jiafuwu";
    }

    @RequestMapping(value = "/jiayinsi.html")
    public String protocoljiayinsi(ModelMap modelMap) {
        return "jiayinsi";
    }

    @RequestMapping(value = "/xiaofuwu.html")
    public String protocolxiaofuwu(ModelMap modelMap) {
        return "xiaofuwu";
    }

    @RequestMapping(value = "/xiaoyinsi.html")
    public String protocolxiaoyinsi(ModelMap modelMap) {
        return "xiaoyinsi";
    }

    @RequestMapping(value = "/bafuwu.html")
    public String protocolbafuwu(ModelMap modelMap) {
        return "bafuwu";
    }

    @RequestMapping(value = "/bayinsi.html")
    public String protocolbayinsi(ModelMap modelMap) {
        return "bayinsi";
    }

    @RequestMapping(value = "/jinfuwu.html")
    public String protocoljinfuwu(ModelMap modelMap) {
        return "jinfuwu";
    }

    @RequestMapping(value = "/jinyinsi.html")
    public String protocoljinyinsi(ModelMap modelMap) {
        return "jinyinsi";
    }

    @RequestMapping(value = "/chengfuwu.html")
    public String protocolchengfuwu(ModelMap modelMap) {
        return "chengfuwu";
    }

    @RequestMapping(value = "/chengyinsi.html")
    public String protocolchengyinsi(ModelMap modelMap) {
        return "chengyinsi";
    }

    @RequestMapping(value = "/haofuwu.html")
    public String protocolhaofuwu(ModelMap modelMap) {
        return "haofuwu";
    }

    @RequestMapping(value = "/haoyinsi.html")
    public String protocolhaoyinsi(ModelMap modelMap) {
        return "haoyinsi";
    }

    @RequestMapping(value = "/zhenfuwu.html")
    public String protocolzhenfuwu(ModelMap modelMap) {
        return "zhenfuwu";
    }

    @RequestMapping(value = "/zhenyinsi.html")
    public String protocolzhenyinsi(ModelMap modelMap) {
        return "zhenyinsi";
    }

    @RequestMapping(value = "/xiaolongfuwu.html")
    public String protocolxiaolongfuwu(ModelMap modelMap) {
        return "xiaolongfuwu";
    }

    @RequestMapping(value = "/xiaolongyinsi.html")
    public String protocolxiaolongyinsi(ModelMap modelMap) {
        return "xiaolongyinsi";
    }

    @RequestMapping(value = "/yangfuwu.html")
    public String protocolyangfuwu(ModelMap modelMap) {
        return "yangfuwu";
    }

    @RequestMapping(value = "/yangyinsi.html")
    public String protocolyangyinsi(ModelMap modelMap) {
        return "yangyinsi";
    }

    @RequestMapping(value = "/kefuwu.html")
    public String protocolkefuwu(ModelMap modelMap) {
        return "kefuwu";
    }

    @RequestMapping(value = "/keyinsi.html")
    public String protocolkeyinsi(ModelMap modelMap) {
        return "keyinsi";
    }

    @RequestMapping(value = "/qufuwu.html")
    public String protocolqufuwu(ModelMap modelMap) {
        return "qufuwu";
    }

    @RequestMapping(value = "/quyinsi.html")
    public String protocolquyinsi(ModelMap modelMap) {
        return "quyinsi";
    }

    @RequestMapping(value = "/xingfuwu.html")
    public String protocolxingfuwu(ModelMap modelMap) {
        return "xingfuwu";
    }

    @RequestMapping(value = "/xingyinsi.html")
    public String protocolxingyinsi(ModelMap modelMap) {
        return "xingyinsi";
    }

    @RequestMapping(value = "/lefuwu.html")
    public String protocollefuwu(ModelMap modelMap) {
        return "lefuwu";
    }

    @RequestMapping(value = "/leyinsi.html")
    public String protocolleyinsi(ModelMap modelMap) {
        return "leyinsi";
    }

    @RequestMapping(value = "/kaifuwu.html")
    public String protocolkaifuwu(ModelMap modelMap) {
        return "kaifuwu";
    }

    @RequestMapping(value = "/kaiyinsi.html")
    public String protocolkaiyinsi(ModelMap modelMap) {
        return "kaiyinsi";
    }

    @RequestMapping(value = "/yaofuwu.html")
    public String protocolyaofuwu(ModelMap modelMap) {
        return "jinYaoHua1";
    }

    @RequestMapping(value = "/yaoyinsi.html")
    public String protocolyaoyinsi(ModelMap modelMap) {
        return "jinYaoHua";
    }

    @RequestMapping(value = "/youfuwu.html")
    public String protocolyoufuwu(ModelMap modelMap) {
        return "youfuwu";
    }

    @RequestMapping(value = "/youyinsi.html")
    public String protocolyouyinsi(ModelMap modelMap) {
        return "youyinsi";
    }

    @RequestMapping(value = "/jifuwu.html")
    public String protocoljifuwu(ModelMap modelMap) {
        return "jifuwu";
    }

    @RequestMapping(value = "/jiyinsi.html")
    public String protocoljiyinsi(ModelMap modelMap) {
        return "jiyinsi";
    }

    @RequestMapping(value = "/shanfuwu.html")
    public String protocolshanfuwu(ModelMap modelMap) {
        return "shanfuwu";
    }

    @RequestMapping(value = "/shanyinsi.html")
    public String protocolshanyinsi(ModelMap modelMap) {
        return "shanyinsi";
    }

    @RequestMapping(value = "/maofuwu.html")
    public String protocolmaofuwu(ModelMap modelMap) {
        return "maofuwu";
    }

    @RequestMapping(value = "/maoyinsi.html")
    public String protocolmaoyinsi(ModelMap modelMap) {
        return "maoyinsil";
    }

    @RequestMapping(value = "/kufuwu.html")
    public String protocolkufuwu(ModelMap modelMap) {
        return "yaofuwu";
    }
    @RequestMapping(value = "/kuyinsi.html")
    public String protocolkuyinsi(ModelMap modelMap) {
        return "yaoyinsi";
    }

    @RequestMapping(value = "/hengfuwu.html")
    public String protocolhengfuwu(ModelMap modelMap) {
        return "hengfuwu";
    }
    @RequestMapping(value = "/hengyinsi.html")
    public String protocolhengyinsi(ModelMap modelMap) {
        return "hengyinsi";
    }
    @RequestMapping(value = "/duofuwu.html")
    public String protocolduofuwu(ModelMap modelMap) {
        return "duofuwu";
    }
    @RequestMapping(value = "/duoyinsi.html")
    public String protocolduoyinsi(ModelMap modelMap) {
        return "duoyinsi";
    }

    @RequestMapping(value = "/mifuwu.html")
    public String protocolmifuwu(ModelMap modelMap) {
        return "mifuwu";
    }
    @RequestMapping(value = "/miyinsi.html")
    public String protocolmiyinsi(ModelMap modelMap) {
        return "miyinsi";
    }
}

